package dletc.List;

public class Point implements Comparable<Point>{

	int x;
	int y;
		
	public Point() {
		super();
	}

	public Point(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}



	@Override
	public String toString() {
		return "x=" + x + ", y=" + y ;
	}



	@Override
	public int compareTo(Point o) {
		//排序规则，两个数的和比较大小
		int len = this.x + this.y;
		int olen = o.x + o.y;
		return len - olen;
	}
	
	
}
